"use strict";
const intellectualProperty = require("../../controllers/intellectualProperty");

module.exports = function (app, router, opts) {
  app.fs.api.logAttr["GET/intellectualProperty/getTotalDisclosureCount"] = {
    name: "获取知识产权交底书总量",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getTotalDisclosureCount",
    intellectualProperty.getTotalDisclosureCount
  );
  app.fs.api.logAttr["GET/intellectualProperty/getDepartmentRanking"] = {
    name: "获取部门排名",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getDepartmentRanking",
    intellectualProperty.getDepartmentRanking
  );
  app.fs.api.logAttr["GET/intellectualProperty/getDetailedStats"] = {
    name: "获取详细统计",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getDetailedStats",
    intellectualProperty.getDetailedStats
  );
  
  // 添加新的接口路由
  app.fs.api.logAttr["GET/intellectualProperty/getAcceptedCasesRanking"] = {
    name: "获取部门知识产权受理量排名",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getAcceptedCasesRanking",
    intellectualProperty.getAcceptedCasesRanking
  );
  
  // 添加知识产权类型分布占比接口
  app.fs.api.logAttr["GET/intellectualProperty/getTypeDistribution"] = {
    name: "获取知识产权类型分布占比",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getTypeDistribution",
    intellectualProperty.getIntellectualPropertyTypeDistribution
  );
  
  // 添加知识产权统计数据接口
  app.fs.api.logAttr["GET/intellectualProperty/getStats"] = {
    name: "获取知识产权统计数据",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getStats",
    intellectualProperty.getIntellectualPropertyStats
  );
  
  // 添加按产品统计知识产权数据的接口
  app.fs.api.logAttr["GET/intellectualProperty/getProductRelatedIPStats"] = {
    name: "获取各个关联产品的知识产权统计",
    visible: false,
  };
  router.get(
    "/intellectualProperty/getProductRelatedIPStats",
    intellectualProperty.getProductRelatedIPStats
  );
};
